#!/bin/sh

[ "$(uci get system.@system[-1].linkit_firstboot)" = "1" ] && return 0
. /lib/functions.sh

config_load firewall

set_wan_fw() {
	local name
	config_get name $1 name
	[ "$name" = "wan" ] || return
	uci set firewall.$1.input=ACCEPT
	uci commit firewall
	exit 0
}

config_foreach set_wan_fw zone
exit 0
